//
//  UrlBuilder.swift
//  YOKO
//
//  Created by 鲁浩 on 16/5/19.
//  Copyright © 2016年 15Tec. All rights reserved.
//

import Foundation
import SwiftDate

class UrlBuilder {
	var params = [String: AnyObject]()

	func appendParam(key: String, value: AnyObject) {
		self.params[key] = value
	}

	func appendTimeStampAndSessionKey() {
		self.appendParam(TIMESTAMP, value: NSDate().timeIntervalSince1970.toString()!)
		// todo: 这里需要添加一个MD5加密的用户信息。
        //self.appendParam(SESSION_KEY, value: String)
	}
    
    // todo: here.
    func appendSyncToken() {
        //        (UserInfo.getInstance().getSyncToken() == null || UserInfo.getInstance().getSyncToken().isEmpty())
    }
    
    // todo: here.
    func appendAccessToken() {
        //        (UserInfo.getInstance().getSyncToken() == null || UserInfo.getInstance().getSyncToken().isEmpty())
    }

	func build() -> Dictionary<String, AnyObject> {
		return self.params
	}
}